import sun.reflect.Reflection;

public class GetCallerClass {


  public static void main(String[] args) {
    Test2 test = new Test2();
    test.g();

  }


  static class Test2 {
    public void g() {
      gg();
    }

    public void gg() {
      System.out.println("-1 : " + Reflection.getCallerClass());
//      System.out.println("-1 : " + Reflection.getCallerClass(-1));
//      System.out.println("0 : " + Reflection.getCallerClass(0));
//      System.out.println("1 : " + Reflection.getCallerClass(1));
//      System.out.println("2 : " + Reflection.getCallerClass(2));
//      System.out.println("3 : " + Reflection.getCallerClass(3));
//      System.out.println("4 : " + Reflection.getCallerClass(4));
//      System.out.println("5 : " + Reflection.getCallerClass(5));
    }

  }
}
